package cn.swpu.blog.dao;

import cn.swpu.blog.entity.BlogTagInfo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public interface BlogTagInfoMapper {
    int deleteByPrimaryKey(Integer blogTagsId);

    int insert(BlogTagInfo record);

    BlogTagInfo selectByPrimaryKey(Integer blogTagsId);

    List<BlogTagInfo> selectAll();

    int updateByPrimaryKey(BlogTagInfo record);

    /**
     * 根据blogId 查询出博客的所有标签，List<Integer>
     * @param blogId
     * @return
     */
    List<Integer> selectByBlogId(@Param("blogId") Integer blogId);

    /**
     * List对象数据插入
     */
    int insertByList(@Param("blogTagInfoList") List<BlogTagInfo> blogTagInfoList);
}